﻿using System.Web.Mvc;
using System.Web.Routing;

namespace GuRenFang.Web
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("elmah.axd");
            routes.IgnoreRoute("{*alljs}", new { alljs = @".*\.js?" });
            routes.IgnoreRoute("{*allashx}", new { allashx = @".*\.ashx?" });
            routes.IgnoreRoute("{*allhtml}", new { allhtml = @".*\.htm?" });
            routes.IgnoreRoute("{*allcss}", new { allcss = @".*\.css?" });
            routes.IgnoreRoute("{*allimages}", new { allimages = @".*\.ico?|.*\.jpg?|.*\.png?|.*\.gif?" });
            
            routes.MapRoute(
            "404-PageNotFound",
            "{*catchall}",
            new { controller = "Home", action = "Error" }
           );
        }
    }
}